perm filename INTOPS.PAL[HAL,HE]9 blob
sn#172536 filedate 1975-08-07 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 .SBTTL Table of interpreter instructions
C00009 ENDMK
C⊗;
.SBTTL Table of interpreter instructions
COMMENT ⊗
This table is parallel to the file INTDEF.SAI[H,RF]. It is required
at several places in the interpreter; each of these can define the
macro MAKEOP however desired. The convention here for types of
arguments that each pseudo-op takes is this:
a absolute address
la list of absolute addresses
o offset or level-offset pair
lo list of offsets or level-offset pairs
n small constant
⊗
II == 2 ;Start of interpreter jump table (0 is illegal instruction)
;Motion control
MAKEOP XMOVE,MOVE,<a> ;Prepare, execute move whose traj table is at a.
;Variables
MAKEOP XMVAR,MVAR,<lo> ;Make graph node for given offsets (list arg)
MAKEOP XKVAR,KVAR,<lo> ;Kill graph node at given offsets (list arg)
MAKEOP XMAKEVT,MAKEVT,<lo> ;Make event variables with offsets as in list.
MAKEOP XDESEVT,DESEVT,<lo> ;Kill event variables with offsets as in list.
MAKEOP XMCLC,MCLC,<o,a,lo> ;Make a calculator for variable at level-offset o
; at address a, with needed list lo.
MAKEOP XMCHG,MCHG,<o,a>;Make a changer for variable at level-offset o at address a.
MAKEOP XGTOLD,GTOLD ;Get the old value for current changer.
MAKEOP XGTNEW,GTNEW ;Get the new value for current changer.
;Stack operations
MAKEOP XGTVAL,GTVAL,<o>;Push value of arg (level-offset pair).
MAKEOP XIGTVAL,IGTVAL,<a> ;Push arg (immediate).
MAKEOP XCHNGE,CHNGE,<o>;Pop value into arg (level-offset pair).
MAKEOP XICHNGE,ICHNGE,<a>;Pop value into arg (immediate).
MAKEOP XPUSH, PUSH,<a> ;Push arg directly (as a ptr) onto stack. For cnstnts.
MAKEOP XPOP, POP ;Pop stack.
MAKEOP XCOPY, COPY ,<n>;Copy n'th down to top of stack.
MAKEOP XREPLAC,REPLAC,<n> ;Replace n'th down with top (which pop)
MAKEOP XFLUSH,FLUSH ;Flush the entire stack.
;Flow of control
MAKEOP XJUMP, JUMP, <a>;Jump to address
MAKEOP XJUMPC,JUMPC,<n,a> ;Jump to address only if condition "n" on top
MAKEOP XTERMINATE,TERMINATE ;Terminate this interpreter
MAKEOP XENDCLC,ENDCLC ;Return from calculator cell
MAKEOP XPROC, PROC,<a,lo> ;Call a procedure at a, with arg list lo
MAKEOP XRETURN,RETURN ;Return from procedure
MAKEOP XSPROUT,SPROUT;la ;Sprout interpreters at each arg, wait (list arg)
MAKEOP XFORCHK,FORCHK,<a> ;Do a FOR-loop check, and fail to location d.
MAKEOP XSIGNAL,SIGNAL,<o> ;Signal event at level-offset o.
MAKEOP XWAITE,WAITE,<o> ;Wait on event at level-offset o.
;Arithmetic
MAKEOP XSADD, SADD ;S+S: Add top two elts, pop, pop, push answer
MAKEOP XSSUB, SSUB ;S-S: Sub top two elts, pop, pop, push answer
MAKEOP XSNEG, SNEG ;-S: Negate top elt, pop, push answer
MAKEOP XSMUL, SMUL ;S*S: Mul top two elts, pop, pop, push answer
MAKEOP XSDIV, SDIV ;S/S: Div top two elts, pop, pop, push answer
MAKEOP XVMAGN, VMAGN ;S ← norm of vector
MAKEOP XVDOT, VDOT ;S ← vector dot vector
MAKEOP XPVDOT,PVDOT ;S ← vector dot vector all 4 cells
MAKEOP XVMAKE,VMAKE ;V ← vector(scalar,scalar,scalar)
MAKEOP XSVMUL,SVMUL ;V ← scalar * vector
MAKEOP XVADD, VADD ;V ← vector + vector
;UNITV remove ;Vector ← vector / its norm
;CROSV remove ;Vector ← vector cross vector
MAKEOP XTVMUL,TVMUL ;Vector ← trans * vector
;AXWR ;T ← rotation(v,v)
MAKEOP XTMAKE,TMAKE ;T ← trans(rot,vector)
MAKEOP XTVADD,TVADD ;T ← t + v
;FTOF
MAKEOP XTTMUL,TTMUL ;T ← trans * trans
;TINVRT
;Condition monitors
MAKEOP XCMMAK,CMMAK,<o>;Make a c-m at offset o
MAKEOP XCMENBL,CMENBL,<o> ;Enable c-m at level-offset o
MAKEOP XCMDSBL,CMDSBL,<o> ;Disable c-m at level-offset o
MAKEOP XCMDEST,CMDEST,<lo> ;Destroy c-m at offset lo (list arg)
MAKEOP XCMTRIG,CMTRIG ;Trigger the c-m body (use only in checker)
MAKEOP XCMSKED,CMSKED ;Sleep for a while (use only in checker)
MAKEOP XCMUNCR,CMUNCR ;Start uncritical section
MAKEOP XCMBWT,CMBWT ;Wait for trigger (use only in body)
;Debugging aids
MAKEOP XPRINT,PRINT ;Type an ASCIZ string on the VT05.
MAKEOP XPRNTS,PRNTS ;Type an scalar value, which pop, on the VT05.
MAKEOP XVALPRN,VALPRN ;Type a value, whatever type it is, and pop it.
MAKEOP XVARPRN,VARPRN,<o> ;Type a variable (level-offset), whatever type.
MAKEOP XBRACE,NOOP ;Bracepoint in the program (break or trace)
MAKEOP XNOOP,NOOP ;Null operation
MAKEOP XTOPAL,TOPAL ;Escape to PAL